<%@page import="com.sun.java.swing.plaf.windows.resources.windows"%>
<%@ page language="java"
	import="java.util.*,bc.swim2.ejb.entity.Ability,bc.swim2.ejb.entity.RegisteredUser"
	contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
	RegisteredUser currentUser = (RegisteredUser) session
			.getAttribute("currentSessionUser");
	RegisteredUser user = (RegisteredUser) session
			.getAttribute("profileUser");
%><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Profile</title>
<style>
@import url(css/main.css);
</style>
<script type="text/javascript" src="js/jquery-1.10.0.js"></script>
</head>

<%
	if (session.getAttribute("nothingSpecial") != null) {
%>
<body onload="easterEgg()">
	<%
		} else {
	%>

<body>
	<%
		}
	%>
	<div id="allContainer">
		<div id="titleContainer">
			<%%>
			<img src="img/swimScritta.gif" id="imageFloat" width=100px;
				height="100px">
			<h1 id="userHomeTitle">
				Welcome,
				<%=currentUser.getFirstName() + " "
					+ currentUser.getLastName()%>!
			</h1>
		</div>
		<div id="container">
			<div id="navigationContainer">
				<a href="MainServlet?to=RegisteredUserHome" id="linkRef">Home</a> <br />
				<a href="MainServlet?to=SearchHelp" id="linkRef">Search Help</a> <br />
				<a href="MainServlet?to=SearchUsers" id="linkRef">Search Users</a> <br />
				<a href="MainServlet?to=MyAbilities" id="linkRef">Declare/Remove
					ability</a> <br /> <a href="MainServlet?to=FriendshipRequests"
					id="linkRef">Friendship Requests</a> <br /> <a
					href="MainServlet?to=Friends" id="linkRef">Your Friends</a> <br />
				<a href="MainServlet?to=MyFeedback" id="linkRef">Feedback</a> <br />
				<a href="MainServlet?to=AbilityRequest" id="linkRef">Ability
					Request</a> <br /> <a href="LoginServlet?methodName=logout"
					id="linkRef">Logout</a>
			</div>
			<div id="actionContainer">
				<h1 id="listTitle"><%=user.getFirstName() + " " + user.getLastName()%></h1>
				<h1 id="listTitle">Abilities:</h1>
				<%
					List<Ability> abilities = null;
					abilities = (List<Ability>) request
							.getAttribute("profileAbilityList");
				%><table>
					<%
						for (Ability a : abilities) {
							String abilityName = a.getName();
					%>
					<tr>
						<td><%=abilityName%></td>
					</tr>

					<%
						}
					%>
				</table>
				<table>
					<tr>
						<td><label id="listLabelA">Email:</label></td>
						<td><%=user.getEmail()%></td>
					</tr>
					<tr>
						<td><label id="listLabelA">Birth Date:</label></td>
						<td><%=user.getBirthDate()%></td>
					</tr>
				</table>


				<br> <a href="MainServlet?to=WriteFeedback" id="linkRef">Write
					Feedback</a><br> <a href="MainServlet?to=ProfileFeedback"
					id="linkRef"> Show <%=user.getFirstName()%> 's Feedbacks
				</a>
			</div>
		</div>
	</div>
</body>

</html>